{include file="public_head" /}
<!-- upload -->
<link href="__STATIC__/css/uploads.css" rel="stylesheet">


<body class="nav-md">

<div class="container body">

    <div class="main_container">

        {include file="public_sidebar,public_nav" /}
        <!-- page content -->
        <div class="right_col" role="main">
            <div class="">

                <div class="page-title">
                    <div class="title_left">
                        <h3></h3>
                    </div>
                </div>
                <div class="clearfix"></div>
                <div class="row">
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>预约订单查看
                                    <!--<small>different form elements</small>-->
                                </h2>
                                <ul class="nav navbar-right panel_toolbox">
                                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                    </li>
                                    <li><a class="close-link"><i class="fa fa-close"></i></a>
                                    </li>
                                </ul>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <br/>
                                <form class="form-horizontal form-label-left" enctype="multipart/form-data" action="" method="post" id="registerForm">

                                    <div class="divider-dashed"></div>

                                    <div class="form-group tc">
                                        <label class="control-label col-md-3" style="">用户名</label>
                                        <div class="col-md-2" style="margin-top: 10px;">
                                            <div>{$item2.member.username}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>
                                    <div class="form-group tc">
                                        <label class="control-label col-md-3" style="">预约门店</label>
                                        <div class="col-md-2" style="margin-top: 10px;">
                                            <div>{$item2.shop.shop_title}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>
                                    <div class="form-group tc">
                                        <label class="control-label col-md-3" style="">预约服务</label>
                                        <div class="col-md-2" style="margin-top: 10px;">
                                            <div>{$item2.single.cat_name}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>
                                    <div class="form-group tc">
                                        <label class="control-label col-md-3" style="">预约日期</label>
                                        <div class="col-md-2" style="margin-top: 10px;">
                                            <div>{$item2.service_date}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>
                                    <div class="form-group tc">
                                        <label class="control-label col-md-3" style="">预约时间</label>
                                        <div class="col-md-2" style="margin-top: 10px;">
                                            <div>{$item2.service_time}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>
                                    <!--<div class="form-group tc">-->
                                        <!--<label class="control-label col-md-3" style="">到店时间</label>-->
                                        <!--<div class="col-md-2" style="margin-top: 10px;">-->
                                            <!--<div>{$item2.arrive_time}&nbsp;&nbsp;&nbsp;&nbsp;</div>-->
                                        <!--</div>-->
                                    <!--</div>-->
                                    <div class="form-group tc">
                                        <label class="control-label col-md-3" style="">预约状态</label>
                                        <div class="col-md-2" style="margin-top: 10px;">
                                            <div>{$item2.statusa}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>
                                    <div class="form-group tc">
                                        <label class="control-label col-md-3" style="">创建时间</label>
                                        <div class="col-md-2" style="margin-top: 10px;">
                                            <div>{$item2.create_time}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>


                                    <!--<div class="divider-dashed"></div>-->



                                    <!--<div class="divider-dashed"></div>-->



                                    <div class="ln_solid"></div>

                                    <div class="form-group">
                                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                                            {eq name="$item2.status" value="1"}
                                            <button type="submit" class="btn btn-primary">确认到店(服务中)</button>
                                            {/eq}
                                            {eq name="$item2.status" value="2"}
                                            <button type="submit" class="btn btn-primary">确认完成(已完成)</button>
                                            {/eq}
                                            {eq name=":session('role_id')" value="1"}
                                            {eq name="$item2.status" value="1"}
                                            <button onclick="quxiao({$item2.id})" type="button" class="btn btn-primary">取消订单</button>
                                            {/eq}
                                            {/eq}
                                            <a type="reset" class="btn btn-success" onclick="history.go(-1)">返回</a>
                                        </div>
                                    </div>
<script>
function quxiao(yuyue_id) {

    $.ajax({
        url: "{:url('index/service_order/yuyue_cancel')}",
        type: 'post',
        data: {'yuyue_id': yuyue_id},
        dateType: 'json',
        success: function (data) {

            if (data.code == 200) {
                layer.msg(data.message);
                history.go(0);
            }else {
                layer.msg(data.message);
            }
        }
    })
}
</script>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
            <!-- /page content -->

        </div>

    </div>
</div>

{include file="public_foot" /}

<!-- Datatables-->
<script src="__STATIC__/js/datatables/jquery.dataTables.min.js"></script>
<script src="__STATIC__/js/datatables/dataTables.bootstrap.js"></script>
<!-- validform -->
<script src="__STATIC__/js/Validform_v5.3.2_min.js"></script>
<script src="__STATIC__/js/layer.js"></script>
<!--upload-->
<script type="text/javascript" src="__STATIC__/js/uploadPreview.js"></script>
<script>
    //upload
    window.onload = function () {
        new uploadPreview({UpBtn: "up_img", DivShow: "imgdiv", ImgShow: "imgShow"});
    }
    //validform
    $(function () {

        $.Tipmsg.r = null;

        var showmsg = function (msg) {
            //假定你的信息提示方法为showmsg， 在方法里可以接收参数msg，当然也可以接收到o及cssctl;
            alert(msg);
        }
        $("#registerForm").Validform({
            tiptype: function (msg) {
                layer.msg(msg);
            },
            tipSweep: true
        });
    })
</script>
<script src="/laydate/laydate.js"></script> <!-- 改成你的路径 -->
<script>
    laydate.render({
        elem: '#test1'
    });
</script>
</body>

</html>
